// 创建唯一Id
export function uuid() {
	return Date.now().toString(36) + "-" + Math.random().toString(36).substring(3, 9);
}

// 获取文件后缀名
export function getFileExtension(filename) {
	if (typeof filename !== 'string') {
		return null;
	}
	const lastIndex = filename.lastIndexOf('.');
	if (lastIndex === -1) {
		return '';
	}
	return filename.slice(lastIndex + 1);
}